<%@ page language="java" import="java.util.*"  pageEncoding="utf-8"  contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<title>通讯录管理系统</title>
<%@ include file="/commons/meta.jsp"%>
<%@ include file="/commons/easyUI.jsp" %>
<script type="text/javascript" src="./js/action/attens.js"></script>
</head>
<body style="margin:-20px">
	<!-- 使用 javascript 创建数据网格（datagrid） -->
	<table id="attens_table" > 
   
	</table> 
	<!-- 在 <div> 标签内定义工具栏 -->
	<div id="tb">
		<div>
			<a href="javascript:openAddAttenDialog()" class="easyui-linkbutton"  data-options="iconCls:'icon-add',plain:true" >添加</a>
			<a href="javascript:openUpdateAttenDialog()" class="easyui-linkbutton"  data-options="iconCls:'icon-edit',plain:true" >修改</a>
			<a href="javascript:deleteAtten()" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
		</div>
		<div>
			&nbsp;员工号：&nbsp;<input type="text"  id="userId2"  size="20" onkeydown="if(event.keyCode==13) searchAtten()"/>
			<a href="javascript:searchAtten()" class="easyui-linkbutton"  data-options="iconCls:'icon-search',plain:true" >搜索</a>
		</div>
	</div>
	
	<!-- 
	新增部门
	 -->
	<div id="addAttenDlg" class="easyui-dialog" style="width: 450px;height:350px;padding: 10px 20px" data-options="closed:true,buttons:'#addAttenDlg-buttons'">
	 	<form id="addAttenFm" method="post">
	 		<table data-options="cellspacing:8px" >
	 			<tr hidden="true">
	 				<td>我的员工号：</td>
	 				<td><input class="easyui-combobox"  id="myId" name="atten.myId" value="${currentUser.userId}"/></td>
	 			</tr> 
	 			<tr>
	 				<td>员工号：</td>
	 				<td><input class="easyui-combobox"  id="userId" name="atten.userId" required="required" data-options="loader: btsloader,mode: 'remote',valueField: 'id',textField: 'name'"   style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>姓名：</td>
	 				<td><input class="easyui-textbox " id="userName" name="atten.userName"  readonly="readonly" style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>手机号码：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="tel" name="atten.tel"  data-options="validType:'mobile'"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 				<tr>
	 				<td>电子邮件：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="email" name="atten.email"   data-options="validType:'email'" style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>家庭电话：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="homeTel" name="atten.homeTel"   data-options="validType:'phone'"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>公司电话：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="companyTel" name="atten.companyTel"  data-options="validType:'phone'" style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>通信地址：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="address" name="atten.address"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 		</table>
	 	</form>
	</div>
	<div id="addAttenDlg-buttons">
		<a href="javascript:addAtten()" class="easyui-linkbutton"  data-options=" iconCls:'icon-ok'">保存</a>
		<a href="javascript:closeAddAttenDlg()"  class="easyui-linkbutton"  data-options=" iconCls:'icon-cancel'">关闭</a>
	</div>
	
	
	<!-- 
	修改部门
	 -->
	<div id="updateAttenDlg" class="easyui-dialog" style="width: 450px;height:450px;padding: 10px 20px" data-options="closed:true,buttons:'#updateAttenDlg-buttons'">
	 	<form id="updateAttenFm" method="post">
	 		<table data-options="cellspacing:8px">
	 			<tr hidden="true">
	 				<td>我的员工号：</td>
	 				<td><input class="easyui-combobox"  id="myId1" name="atten.myId" value="${currentUser.userId}"/></td>
	 			</tr> 
	 			<tr>
	 				<td>员工号：</td>
	 				<td><input class="easyui-textbox"  id="userId1" name="atten.userId" readonly="readonly"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>姓名：</td>
	 				<td><input class="easyui-textbox " id="userName1" name="atten.userName"  readonly="readonly" style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>手机号码：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="tel1" name="atten.tel"  data-options="validType:'mobile'"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 				<tr>
	 				<td>电子邮件：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="email1" name="atten.email"   data-options="validType:'email'" style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>家庭电话：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="homeTel1" name="atten.homeTel"   data-options="validType:'phone'"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>公司电话：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="companyTel1" name="atten.companyTel"  data-options="validType:'phone'" style="width:300px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>通信地址：</td>
	 				<td><input class="easyui-textbox ; easyui-validatebox"  id="address1" name="atten.address"  style="width:300px;height:30px;"/></td>
	 			</tr> 
	 		</table>
	 	</form>
	</div>
	
	<div id="updateAttenDlg-buttons">
		<a href="javascript:updateAtten()" class="easyui-linkbutton"  data-options=" iconCls:'icon-ok'">保存修改</a>
		<a href="javascript:closeUpdateAttenDlg()"  class="easyui-linkbutton"  data-options=" iconCls:'icon-cancel'">关闭修改</a>
	</div>
</body>
</html>